/* Markdown演示页面样式 */
.markdown-demo {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background: #f8f9fa;
  min-height: 100vh;
}

.demo-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 40px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.demo-header h1 {
  font-size: 2.5em;
  margin: 0 0 10px 0;
  font-weight: 700;
}

.demo-header p {
  font-size: 1.2em;
  margin: 0;
  opacity: 0.9;
}

.demo-controls {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.tab-buttons {
  display: flex;
  gap: 8px;
}

.tab-buttons button {
  padding: 10px 20px;
  border: 2px solid #e1e5e9;
  background: white;
  color: #24292e;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.tab-buttons button:hover {
  border-color: #0366d6;
  color: #0366d6;
}

.tab-buttons button.active {
  background: #0366d6;
  color: white;
  border-color: #0366d6;
}

.options {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.options label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #24292e;
  cursor: pointer;
}

.options input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #0366d6;
}

.demo-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 20px;
}

.demo-section {
  padding: 20px;
}

.demo-section h2 {
  margin: 0 0 20px 0;
  color: #24292e;
  font-size: 1.5em;
  font-weight: 600;
}

.demo-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.info-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
  margin: 0 0 16px 0;
  color: #24292e;
  font-size: 1.2em;
  font-weight: 600;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 4px;
}

.info-item .label {
  font-weight: 500;
  color: #6a737d;
}

.info-item .value {
  font-weight: 600;
  color: #24292e;
}

.metadata-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metadata-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f3f4;
}

.metadata-item:last-child {
  border-bottom: none;
}

.metadata-item .key {
  font-weight: 600;
  color: #6a737d;
  min-width: 60px;
  flex-shrink: 0;
}

.metadata-item .value {
  color: #24292e;
  flex: 1;
}

.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  background: #e3f2fd;
  color: #1976d2;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.toc-preview {
  max-height: 200px;
  overflow-y: auto;
}

.toc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 14px;
}

.toc-level {
  background: #f1f3f4;
  color: #6a737d;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.toc-title {
  color: #24292e;
  flex: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .markdown-demo {
    padding: 10px;
  }
  
  .demo-header {
    padding: 30px 15px;
  }
  
  .demo-header h1 {
    font-size: 2em;
  }
  
  .demo-header p {
    font-size: 1.1em;
  }
  
  .demo-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  
  .tab-buttons {
    justify-content: center;
  }
  
  .options {
    justify-content: center;
  }
  
  .demo-section {
    padding: 15px;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .demo-info {
    grid-template-columns: 1fr;
  }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
  .markdown-demo {
    background: #1a1a1a;
  }
  
  .demo-controls,
  .demo-content,
  .info-card {
    background: #2d2d2d;
    color: #e0e0e0;
  }
  
  .tab-buttons button {
    background: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
  }
  
  .tab-buttons button:hover {
    border-color: #4dabf7;
    color: #4dabf7;
  }
  
  .tab-buttons button.active {
    background: #4dabf7;
    color: white;
    border-color: #4dabf7;
  }
  
  .options label {
    color: #e0e0e0;
  }
  
  .demo-section h2 {
    color: #e0e0e0;
  }
  
  .info-card h3 {
    color: #e0e0e0;
  }
  
  .info-item {
    background: #404040;
  }
  
  .info-item .label {
    color: #b0b0b0;
  }
  
  .info-item .value {
    color: #e0e0e0;
  }
  
  .metadata-item .key {
    color: #b0b0b0;
  }
  
  .metadata-item .value {
    color: #e0e0e0;
  }
  
  .metadata-item {
    border-bottom-color: #404040;
  }
  
  .tag {
    background: #1e3a8a;
    color: #93c5fd;
  }
  
  .toc-level {
    background: #404040;
    color: #b0b0b0;
  }
  
  .toc-title {
    color: #e0e0e0;
  }
}
